package hash;

import java.util.HashSet;
import java.util.Set;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User:周次煜
 * Date: 2024-04-22
 * Time：17:04
 */
public class TestKVHash {
    public static void main(String[] args) {
        KVHashBucket<String,String> kvhb=new KVHashBucket<>();
        kvhb.put("钟大帅哥","喜欢美女！");
        kvhb.put("郭大男神","喜欢拉比！");
        kvhb.put("刘大少爷","喜欢花钱！");

    }


}






class N{
    public int singleNumber(int[] nums) {
        Set<Integer> set=new HashSet<Integer>();
        for(int i=0; i<nums.length; ++i) {
            if(set.contains(nums[i])) {
                set.remove(nums[i]);
            } else {
                set.add(nums[i]);
            }
        }

        for(int i=0;i<nums.length;++i) {
            if(set.contains(nums[i])) {
                return nums[i];
            }
        }

        return -1;
    }
        }